package com.financing.wap.dao.impl;


import java.sql.SQLException;
import java.util.List;
import java.util.Map;
import org.springframework.stereotype.Repository;
import com.financing.wap.dto.FpShopProjectInformationDTO;
import com.financing.wap.dao.IFpShopProjectInformationDao;
import com.financing.wap.common.SqlName;
/**
 * fp_shop_project_information  
 * 产品资讯关联表 数据访问层实现类
 * @author huqiyun
 *
 */
 
@Repository("fpShopProjectInformationDao")
public class FpShopProjectInformationDaoImpl extends BaseDaoImpl<FpShopProjectInformationDTO, java.lang.Integer> implements IFpShopProjectInformationDao {


	@Override
	public int insert(FpShopProjectInformationDTO fpShopProjectInformation) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.insert(SqlName.FpShopProjectInformationSql.insert, fpShopProjectInformation);
	}

	@Override
	public void update(FpShopProjectInformationDTO fpShopProjectInformation) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopProjectInformationSql.update, fpShopProjectInformation);
	}

	@Override
	public void updateForce(FpShopProjectInformationDTO fpShopProjectInformation) throws SQLException {
		this.sqlMapClientTemplate.update(SqlName.FpShopProjectInformationSql.updateForce, fpShopProjectInformation);
	}

	@Override
	public void delete(Integer id) throws SQLException {
		this.sqlMapClientTemplate.delete(SqlName.FpShopProjectInformationSql.delete,id);
	}
	
	@SuppressWarnings("unchecked")	
	@Override
	public List<FpShopProjectInformationDTO> queryList(FpShopProjectInformationDTO fpShopProjectInformation) throws SQLException {
		return this.sqlMapClientTemplate.queryForList(SqlName.FpShopProjectInformationSql.queryList, fpShopProjectInformation);
	}

	@Override
	public int queryListCount(FpShopProjectInformationDTO fpShopProjectInformation) throws SQLException {
		return (Integer) this.sqlMapClientTemplate.queryForObject(SqlName.FpShopProjectInformationSql.queryListCount, fpShopProjectInformation);
	}

	@Override
	public FpShopProjectInformationDTO loadById(Integer id) throws SQLException {
		return  (FpShopProjectInformationDTO)this.getSqlMapClientTemplate().queryForObject(SqlName.FpShopProjectInformationSql.loadById,id);
	}

	@Override
	public Class<FpShopProjectInformationDTO> getEntityClass() {
		return FpShopProjectInformationDTO.class;
	}
 	
}
